<!DOCTYPE html>
<html lang="en"xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>模块添加</title>
</head>
<script>
    $(function (){
        $("#brandIds").select2();
        $("#specIds").select2();
    })
</script>
<body>
<form id="addForm">
    <table class="table table-condensed"  cellspacing="0" cellpadding="0"  >
        <tr>
            <td style="text-align: center;vertical-align: middle">商品类型</td>
            <td>
                <input type="text" name="name" id="name">
            </td>
        </tr>
        <tr>
            <td style="text-align: center;vertical-align: middle">关联品牌</td>
            <td>
                <select name="brandIds" id="brandIds" multiple style="width: 100%">
                    <option th:each="b : ${brandList}" th:value="${b.id}" th:text="${b.name}"></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="text-align: center;vertical-align: middle">关联规格</td>
            <td>
                <select name="specIds" id="specIds" multiple style="width: 100%">
                    <option th:each="s : ${specList}" th:value="${s.id}" th:text="${s.specName}"></option>
                </select>
            </td>
        </tr>
        <tr>
            <td style="text-align: center;vertical-align: middle">
                <input type="button" value="新建扩展属性" onclick="insertNode()">
            </td>
            <td>
            </td>
        </tr>
        <table class="table table-bordered table-striped table-hover dataTable" id="tab">
            <thead>
            <tr>
                <th style="text-align: center;vertical-align: middle">属性名称</th>
                <th style="text-align: center;vertical-align: middle">操作</th>
            </tr>
            </thead>
            <tbody id="tbody">
            </tbody>
        </table>
    </table>
</form>
</body>
</html>